﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Input;
using System.Collections;

namespace TozCombat
{
    class Manette
    {
        public Keys Droite;
        public Keys Gauche;
        public Keys Bas;
        public Keys Haut;
        public Keys Poing;
        public Keys Pied;
        private Hashtable hashtable = new Hashtable();

        public Hashtable Hashtable
        {
            get { return hashtable; }
            set { hashtable = value; }
        }

        public void initController1()
        {
            Droite = Keys.D;
            Gauche = Keys.Q;
            Bas = Keys.S;
            Haut = Keys.Z;
            Poing = Keys.A;
            Pied = Keys.E;
            hashtable[Droite] = true;
            hashtable[Gauche] = true;
            hashtable[Bas] = true;
            hashtable[Haut] = true;
            hashtable[Poing] = true;
            hashtable[Pied] = true;
        }

        public void initController2()
        {
            Droite = Keys.Right;
            Gauche = Keys.Left;
            Bas = Keys.Down;
            Haut = Keys.Up;
            Poing = Keys.L;
            Pied = Keys.M;
            hashtable[Droite] = true;
            hashtable[Gauche] = true;
            hashtable[Bas] = true;
            hashtable[Haut] = true;
            hashtable[Poing] = true;
            hashtable[Pied] = true;
        }

        public void behaviorJump()
        {
            hashtable[Droite] = true;
            hashtable[Gauche] = true;
            hashtable[Bas] = false;
            hashtable[Haut] = false;
            hashtable[Poing] = false;
            hashtable[Pied] = false;
        }

        public void behaviorBlock()
        {
            hashtable[Droite] = false;
            hashtable[Gauche] = false;
            hashtable[Bas] = false;
            hashtable[Haut] = false;
            hashtable[Poing] = false;
            hashtable[Pied] = false;
        }

        public void behaviorHit()
        {
            hashtable[Droite] = false;
            hashtable[Gauche] = false;
            hashtable[Bas] = false;
            hashtable[Haut] = false;
            hashtable[Poing] = false;
            hashtable[Pied] = false;
        }

        public void behaviorMove()
        {
            hashtable[Droite] = true;
            hashtable[Gauche] = true;
            hashtable[Bas] = true;
            hashtable[Haut] = true;
            hashtable[Poing] = true;
            hashtable[Pied] = true;
        }
    }
}
